"""
计算1-100的和
"""

i = 0
sum = 0
while i <= 100:
    sum = sum + i
    i = i + 1

"""
计算 1-100的偶数和
"""

# 初始化变量a和result，用于循环和累加
a = 0
result = 0

# 循环遍历1到100的所有整数
while a <= 100:
    a = a + 1
    # 如果a是偶数，则累加到result中
    if a % 2 == 0:
        result = result + a

# 打印1到100的偶数和
print(result)

# 初始化变量b和result1，用于循环和累加
b = 0
result1 = 0

# 循环遍历1到100的所有偶数，并累加到result1中
while b <= 100:
    result1 = result1 + b
    b = b + 2

# 打印1到100的偶数和
print(result1)
